<?php

namespace app\api\controller\v1;
use app\api\model\Category as CategoryModel;
use app\lib\exception\CateException;

class Category
{
    /*
     * return 产品分类
     */
    public function getAllCateGory()
    {
        $result = CategoryModel::all([], 'img');
        if(!$result){
            throw new CateException();
        }
        return $result;
    }


}
